package io.github.mobodev.accessbilityservicetest;

import android.content.Context;
import android.util.Log;

import java.util.Date;

/**
 * Created by bshao on 5/5/16.
 */
public class PhoneCallReceiver extends BasePhoneCallReceiver {
    protected void onIncomingCallAnswered(Context ctx, String number, Date start) {
        Log.v(Utils.TAG, "incoming call answered");
    }

    protected void onIncomingCallEnded(Context ctx, String number, Date start, Date end) {
        Log.v(Utils.TAG, "incoming call ended");
    }

    protected void onIncomingCallReceived(Context ctx, String number, Date start) {
        Log.v(Utils.TAG, "incoming call");
    }

    protected void onMissedCall(Context ctx, String number, Date start) {
        Log.v(Utils.TAG, "missed call");
    }

    protected void onOutgoingCallEnded(Context ctx, String number, Date start, Date end) {
        Log.v(Utils.TAG, "outgoing call ended");
        CallVibratorAccessibilityService.handlVibrate(ctx, false);
    }

    protected void onOutgoingCallStarted(Context ctx, String number, Date start) {
        PreferencesController.setOutGoingCallStarted(ctx, true);
        Log.v(Utils.TAG, "outgoing call started");
    }
}
